import javax.swing.JOptionPane;

public class InputNames {
	public static void main(String[] args) {

		String username = JOptionPane.showInputDialog("Enter your name");
		String surnameUsername = JOptionPane
				.showInputDialog("Enter your surname");
		String age = JOptionPane.showInputDialog("Enter your age");
		Integer num = Integer.parseInt(age);

		JOptionPane.showMessageDialog(null, "Witaj " + username + " "
				+ surnameUsername);

		if (num > 40) {
			JOptionPane.showMessageDialog(null, "Uwazaj kolego masz juz lat : "
					+ age);

		}
		if (num < 40) {
			JOptionPane.showMessageDialog(null,
					"Mozesz jeszcze poszalec, masz juz lat : " + age);

		}
	}

}
